package com.niit.serviceconsumer.controller;

import com.niit.serviceconsumer.client.ProducerClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hanli
 * @date 2025/3/2
 * @description TODO
 */
@RestController
public class HelloController {

    @Autowired
    ProducerClient producerClient;

    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name){
        return producerClient.getHelloMessage(name);
    }
}